package com.yld.demo.controller;


import com.yld.demo.entity.ProdInfo;
import com.yld.demo.service.ProdInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yld.utils.ResultUtils;
import yld.utils.ResultVo;

import java.util.List;

@RestController
@RequestMapping("/prod")
public class ProdInfoController {

    @Autowired
    ProdInfoService prodInfoService;

    @GetMapping(path = "/selectById")
    public ResultVo<ProdInfo> selectById(Integer prodId) {
        ProdInfo prodInfos = prodInfoService.selectById(prodId);
        System.out.println(prodInfos);
        return ResultUtils.success("查询成功！",prodInfos);
    }
}
